package com.server.modules.wx.web;

import com.foxinmy.weixin4j.exception.WeixinException;
import com.foxinmy.weixin4j.model.qr.QRParameter;
import com.foxinmy.weixin4j.model.qr.QRResult;
import com.server.modules.api.Base.BaseAppController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;



/**
 * Created by Administrator on 2016/10/31.
 */

@Controller
@RequestMapping("/api/wx")
public class WeiXinController extends BaseAppController{

    @ResponseBody
    @RequestMapping(value = {"/qr", ""})
    public QRResult qr(String test) throws WeixinException {

        return weixinProxy.createQR( QRParameter.createPermanenceQR(test) );
    }
}

